// 楼层装修相关
import request,{Method} from '@/libs/api.js'

// 获取卖家端的店铺装修数据
export function getSellerPageDataByPage (params) {
    return request({
      url: '/coupon/pagedata/getSellerPageDataByPage',
      method: Method.POST,
      data: params
    });
}

// 添加装修数据
export function addPageData (params) {
    return request({
      url: '/coupon/pagedata/addPageData',
      method: Method.POST,
      data: params
    });
}

// 编辑页面装修数据的名称
export function editPageDataName (params) {
    return request({
      url: '/coupon/pagedata/editPageDataName',
      method: Method.PUT,
      data: params
    });
}

// 删除装修数据
export function deletePageData (id) {
  return request({
    url: `/coupon/pagedata/deletePageData/${id}`,
    method: Method.DELETE,
  });
}

// 改变页面装修发布状态
export function updatePageDataShow (params) {
    return request({
      url: '/coupon/pagedata/updatePageDataShow',
      method: Method.PUT,
      data: params
    });
}

//根据ID获取优惠券详情
export function getPageData(id){
  return request({
      url : `/coupon/pagedata/getPageData/${id}`,
      method: Method.GET,
  })
}

// 保存用户添加的装修模板
export function saveFloorTemplate (params) {
    return request({
      url: '/coupon/pagedata/saveFloorTemplate',
      method: Method.PUT,
      data: params
    });
}